The invention relates to a method of transforming data, and particularly, to a method of transforming data during a tonal transformation process.
An image scanned using an imaging device (e.g. a scanner, a multi-functional device such as a scanner-printer-facsimile machine, etc.) may have several transformations performed on it before the resultant image is either displayed (e.g., on a PC) or printed (e.g., via a printer). For example, the target image can be scanned at a bit-depth of 30 to 48 bits, and then transformed to a 24-bit image where the 24-bit image is saved and viewed on a personal computer. Alternately, the 24-bit image can be processed to a 4-bit to 9-bit image and printed on a printing device.
One common type of image transformation is known as tonal transformation. A scanned image may go through several tonal transformations to achieve the desired result. Example tonal transformations include gamma compensation, brightness/contrast adjustment, and shadow enhancement. The quality of the transformation has a direct effect on the quality of the scanned output image, making tonal transformation important to the quality of a scanner. Poor methods of transformation may cause visually detectable quantization in the scanned output image and a decreased scanner modulated transfer function (MTF) measurement. One method to reduce quantization is to input a higher bit-depth image than is output during the tonal correction (e.g. a 36-bit image becomes a 24-bit image after the tonal transformation).
One method of tonal transformation is to apply a mathematical equation to each pixel in the image. This is a common way to transform a RGB image to a sRGB image or to adjust the brightness or contrast of an image. In multi-functional devices, a transformation such as this usually takes place inside the application specific integrated circuit (ASIC) during a standalone copy. Applying multiple, complex mathematical equations to the image for such transformations may be detrimental to the performance of the copy operation and may be too inflexible to be practically implemented in an ASIC.
To maintain flexibility and performance of the ASIC, a lookup table (LUT) can be used to perform tonal transformations. In one method, the value of the pixel indexes directly into a table with the resulting output pixel being returned. What is stored in the table can be easily updated, thus allowing for flexibility. Multiple transformations can be achieved using a single LUT, and thus, further improve performance.
One problem with using a direct indexing method is the size of the LUT. For example, if a 16-bit color indexes into a table that returns an 8-bit color, a 65536×8 table is required. This would result in a 64 KB table. For a 48-bit to 24-bit tonal table (or three 16-bit to 8-bit tables, each corresponding to one of three colors (e.g., red, green, and blue)), the table requires a 192 KB RAM, which is costly to implement in hardware. Placing the table in main memory and using direct memory access (DMA) to access the table places a significant burden on memory resources, which may affect the performance of the ASIC. It would be beneficial to have an alternative method of performing tonal transformation.